<html>
<head>
<#include "WEB-INF/view/_frag/_meta.ftl">
<title>用户列表</title>
<#include "WEB-INF/view/_frag/_jscss.ftl">
</head>
<body>
<div class="container">
    <div>
    <nav class="navbar navbar-default">
            <div class="container">
             <a class="navbar-brand" href="#"><span class="glyphicon glyphicon-user"></span> 用户列表</a>
                <p class="navbar-text navbar-right" style="margin-right: 20px;">[<a href="list?locale=zh_CN">中文</a> | <a href="list?locale=en_US">English</a>]</p>
            </div>
        </nav>
        <div><a class="btn btn-success btn-sm" href="toOper"><span class="glyphicon glyphicon-plus"></span> <@i18n name="nature.add"/></a></div>
        <div class="table-responsive">
            <table class="table table-hover table-bordered">
                <thead>
                <tr>
                    <th>序号</th>
                    <th>名字</th>
                    <th>年龄</th>
                    <th>性别</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                <#list page.dataList as user>
                <tr>
                    <td>${user.id}</td>
                    <td>${user.name}</td>
                    <td>${user.age }</td>
                    <td>${user.sex}</td>
                    <td width="130px">
                        <a class="btn btn-primary btn-xs" href="toOper?user.id=${user.id}"><span class="glyphicon glyphicon-edit"></span> <@i18n name="nature.edit"/></a>
                        <@auth prem="/user/delete">
                        <a class="btn btn-danger btn-xs" href="delete?user.id=${user.id}"><span class="glyphicon glyphicon-trash"></span> <@i18n name="nature.delete"/></a>
                        </@auth>
                    </td>
                </tr>
                </#list>
                </tbody>
            </table>
        </div>
        <div class="pull-right">${page.pagination}</div>
        <br>
        <div class="table-responsive">
            <table class="table table-hover table-bordered">
                <thead>
                <tr>
                    <th>序号</th>
                    <th>名字</th>
                    <th>年龄</th>
                    <th>性别</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                <#list myPage.dataList as user>
                <tr>
                    <td>${user.id}</td>
                    <td>${user.name}</td>
                    <td>${user.age }</td>
                    <td>${user.sex}</td>
                    <td width="130px">
                        <a class="btn btn-primary btn-xs" href="toOper?user.id=${user.id}"><span class="glyphicon glyphicon-edit"></span> <@i18n name="nature.edit"/></a>
                        <a class="btn btn-danger btn-xs" href="delete?user.id=${user.id}"><span class="glyphicon glyphicon-trash"></span> <@i18n name="nature.delete"/></a>
                    </td>
                </tr>
                </#list>
                </tbody>
            </table>
        </div>
        <div class="pull-right">${myPage.pagination}</div>
       <#include "WEB-INF/view/_frag/_footer.ftl">
    </div>
</div>
<!-- /container -->
</body>
</html>